package com.jinlia.show.modules.base.system.entity;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateDeserializer;
import com.jinlia.show.modules.base.config.DynamicSchemaConfig;
import lombok.Data;

import java.time.LocalDate;

/**
 * id生产器
 */
@Data
@TableName(value = "id_generator", schema = DynamicSchemaConfig.schema_system)
public class IdGenerator {
    @TableId()
    private Long id;

    private Long currentId;
    private String currentIdStr;
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd")
    @JsonDeserialize(using = LocalDateDeserializer.class)
    private LocalDate currentDay;
    /**
     * orderNum
     */
    private String idType;

    private String remark;

    private Integer version;
}
